package org.qiyu.live.id.generate.provider.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName t_id_generate_config
 */
@TableName(value ="t_id_generate_config")
public class IdGeneratePO implements Serializable {
    /**
     * primary_key
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * description
     */
    private String remark;

    /**
     * Threshold for the current id phase
     */
    private Long nextThreshold;

    /**
     * initial value 当前id所在阶段的开始值
     */
    private Long initNum;

    /**
     * The start value of the current id phase
     */
    private Long currentStart;

    /**
     * id incremental interval
     */
    private Integer step;

    /**
     * in order (0 unordered, 1 ordered) 是否是有序的id
     */
    private Integer isSeq;

    /**
     * Business prefix code, if it is not present, it is returned without it
     */
    private String idPrefix;

    /**
     * Optimistic Lock Version No.
     */
    private Integer version;

    /**
     * 
     */
    private Date createTime;

    /**
     * 
     */
    private Date updateTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * primary_key
     */
    public Integer getId() {
        return id;
    }

    /**
     * primary_key
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * description
     */
    public String getRemark() {
        return remark;
    }

    /**
     * description
     */
    public void setRemark(String remark) {
        this.remark = remark;
    }

    /**
     * Threshold for the current id phase
     */
    public Long getNextThreshold() {
        return nextThreshold;
    }

    /**
     * Threshold for the current id phase
     */
    public void setNextThreshold(Long nextThreshold) {
        this.nextThreshold = nextThreshold;
    }

    /**
     * initial value
     */
    public Long getInitNum() {
        return initNum;
    }

    /**
     * initial value
     */
    public void setInitNum(Long initNum) {
        this.initNum = initNum;
    }

    /**
     * The start value of the current id phase
     */
    public Long getCurrentStart() {
        return currentStart;
    }

    /**
     * The start value of the current id phase
     */
    public void setCurrentStart(Long currentStart) {
        this.currentStart = currentStart;
    }

    /**
     * id incremental interval
     */
    public Integer getStep() {
        return step;
    }

    /**
     * id incremental interval
     */
    public void setStep(Integer step) {
        this.step = step;
    }

    /**
     * in order (0 unordered, 1 ordered)
     */
    public Integer getIsSeq() {
        return isSeq;
    }

    /**
     * in order (0 unordered, 1 ordered)
     */
    public void setIsSeq(Integer isSeq) {
        this.isSeq = isSeq;
    }

    /**
     * Business prefix code, if it is not present, it is returned without it
     */
    public String getIdPrefix() {
        return idPrefix;
    }

    /**
     * Business prefix code, if it is not present, it is returned without it
     */
    public void setIdPrefix(String idPrefix) {
        this.idPrefix = idPrefix;
    }

    /**
     * Optimistic Lock Version No.
     */
    public Integer getVersion() {
        return version;
    }

    /**
     * Optimistic Lock Version No.
     */
    public void setVersion(Integer version) {
        this.version = version;
    }

    /**
     * 
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * 
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    /**
     * 
     */
    public Date getUpdateTime() {
        return updateTime;
    }

    /**
     * 
     */
    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        IdGeneratePO other = (IdGeneratePO) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()))
            && (this.getNextThreshold() == null ? other.getNextThreshold() == null : this.getNextThreshold().equals(other.getNextThreshold()))
            && (this.getInitNum() == null ? other.getInitNum() == null : this.getInitNum().equals(other.getInitNum()))
            && (this.getCurrentStart() == null ? other.getCurrentStart() == null : this.getCurrentStart().equals(other.getCurrentStart()))
            && (this.getStep() == null ? other.getStep() == null : this.getStep().equals(other.getStep()))
            && (this.getIsSeq() == null ? other.getIsSeq() == null : this.getIsSeq().equals(other.getIsSeq()))
            && (this.getIdPrefix() == null ? other.getIdPrefix() == null : this.getIdPrefix().equals(other.getIdPrefix()))
            && (this.getVersion() == null ? other.getVersion() == null : this.getVersion().equals(other.getVersion()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        result = prime * result + ((getNextThreshold() == null) ? 0 : getNextThreshold().hashCode());
        result = prime * result + ((getInitNum() == null) ? 0 : getInitNum().hashCode());
        result = prime * result + ((getCurrentStart() == null) ? 0 : getCurrentStart().hashCode());
        result = prime * result + ((getStep() == null) ? 0 : getStep().hashCode());
        result = prime * result + ((getIsSeq() == null) ? 0 : getIsSeq().hashCode());
        result = prime * result + ((getIdPrefix() == null) ? 0 : getIdPrefix().hashCode());
        result = prime * result + ((getVersion() == null) ? 0 : getVersion().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", remark=").append(remark);
        sb.append(", nextThreshold=").append(nextThreshold);
        sb.append(", initNum=").append(initNum);
        sb.append(", currentStart=").append(currentStart);
        sb.append(", step=").append(step);
        sb.append(", isSeq=").append(isSeq);
        sb.append(", idPrefix=").append(idPrefix);
        sb.append(", version=").append(version);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}